package seqlist.stack_queue;

import java.util.LinkedList;
import java.util.Queue;

/**
 * @author yuisama
 * @date 2023/03/22 19:14
 * JDK中队列的使用
 **/
public class QueueTest {
    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(3);
        queue.offer(5);
        queue.offer(7);
        // 1
        System.out.println(queue.peek());
        // 1
        System.out.println(queue.poll());
        System.out.println(queue);
    }
}